// 草地hcanvas子类
import canvasAbstract from './canvasAbstract';
import config from '../config';
import bossModel from '../model/boss';

export default  new (class boss extends canvasAbstract implements ICanvas{
  name = 'boss';
  num(): number {
    return 0;
  }
  model(): ModelInterface {
    return bossModel;
  }
  render() {
    this.createModel();
    super.renderModel();
  };
  createModel() {
    [{ x: config.canvas.width / 2, y: config.canvas.hieght - config.model.height }].forEach(position => {
      const model = this.model();
      const instance = new model(position.x, position.y);
      this.modelist.push(instance);
    });
  }
})('boss');